// asserts/component/common/picker/picker.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    show: Boolean,
    list: {
      type: Array,
      value: [
        {
          name: "新东方",
          code: "1",
          choosed: false
        },
        {
          name: "程序员",
          code: "2",
          choosed: true
        },
        {
          name: "北方鸷鸟",
          code: "3",
          choosed: false
        }
      ]
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
  },

  /**
   * 组件的方法列表
   */
  methods: {
    cancel: function() {
      this.setData({
        show: false
      })
    },
    itemClick: function(e) {
      this.triggerEvent("classChoose",e.currentTarget.dataset.item,{});
    }
  }
})
